Skip to content

Fix: alert dialog box cancel button color - #82236

Closed
Kallyan01 wants to merge 5 commits into
WordPress:trunkfrom
Kallyan01:fix/alert-dialog-button-color
Closed

Kallyan01 wants to merge 5 commits into
WordPress:trunkfrom
Kallyan01:fix/alert-dialog-button-color

Conversation

@Kallyan01

@Kallyan01 Kallyan01 commented Aug 31, 2026 •

Copy link
Copy Markdown

What?

Closes #81934

Makes AlertDialog.Popup's built-in Cancel button render with tone="neutral" instead of falling through to Button's 'brand' default.

Why?

A Cancel button sitting next to a Confirm/Delete button is definitionally the "less prominent" action, so it should be neutral. AlertDialog.Popup renders that button internally and passed no tone, so it inherited the 'brand' default

How?

One-line change in popup.tsx pass tone="neutral" to the Button rendered by _AlertDialog.Close

Testing Instructions

Testing Instructions for Keyboard

  • npm run storybook:dev
  • Go to Design System → Components → AlertDialog.
  • Open the Default story, trigger the dialog, and confirm the Cancel button renders in neutral (grey) rather than brand-blue, while the confirm button keeps its brand styling.

Screenshots or screencast

Before After
image image

Use of AI Tools

Used Claude for testing and generating the PR description.

@github-actions github-actions Bot added the [Package] UI /packages/ui label Aug 31, 2026
@github-actions github-actions Bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Aug 31, 2026
@github-actions

Copy link
Copy Markdown

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @Kallyan01! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@Kallyan01
Kallyan01 marked this pull request as ready for review August 31, 2026 10:30
@Kallyan01
Kallyan01 requested a review from a team as a code owner August 31, 2026 10:30
@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Kallyan01 <kallyansin@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: shaunandrews <shaunandrews@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ciampo ciampo added the [Type] Bug An existing feature does not function as intended label Aug 31, 2026
Comment thread packages/ui/CHANGELOG.md Resolved
Comment thread packages/ui/CHANGELOG.md
- `Calendar`, `RangeCalendar`: Use the WordPress text direction when no supported formatting locale is provided, while preserving explicit locale and `dir` precedence. ([#81982](https://github.com/WordPress/gutenberg/pull/81982))
- `Calendar`, `RangeCalendar`: Align day states with neutral WPDS color tokens. ([#81438](https://github.com/WordPress/gutenberg/pull/81438))
- `Calendar`, `RangeCalendar`: Show tooltips for the previous and next month buttons. ([#81983](https://github.com/WordPress/gutenberg/pull/81983))
- `AlertDialog`: Use a neutral tone for the cancel button. ([#82236](https://github.com/WordPress/gutenberg/issues/82236))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this CHANGELOG entry under the latest Unreleased > Bug Fixes section

@ciampo

ciampo commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

LGTM otherwise. I will approve + merge once the CHANEGLOG entry is moved to the right section 🙏

Comment thread packages/ui/CHANGELOG.md Resolved
@ciampo

ciampo commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Will close in favour of a new PR authored by me, so that we can fix the CHANGELOG entry and merge it soon.

@Kallyan01 , I'll mention you as a co-author 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Package] UI /packages/ui [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AlertDialog: Cancel button can't be set to tone="neutral", contradicting Button's own tone semantics

2 participants